/**
 * Copyright (C) 2009+ Spark Zheng
 *
 * @file        src/dserver_log.c 
 * @date        2010-05-12
 * @brief	server_framework
 * @see         dserver
 * @history
 */

#include "dserver_errno.h"
#include "dserver_log.h"

static dlib_log_args_t log_arg[LOG_NUM] = {
	{LOG_MAIN, "dserver_main.log"},
	{LOG_MONT, "dserver_mont.log"},
	{LOG_PROT, "dserver_prot.log"},
	{LOG_FILT, "dserver_filt.log"}
};

int dserver_log_init(const char *log_path)
{
	if (dlib_log_init(LOG_IDENT, log_path, LOG_NUM, log_arg) < 0) {
		return -E_UNEXPECTED;
	}
	return RET_SUCCESS;
}

void dserver_log_exit()
{
	return dlib_log_exit(LOG_NUM);
}
